1. Field of the Invention
The present invention relates to a control circuit used in a microcomputer, a semiconductor memory, or the like as a command processor, and a semiconductor device including the same. More particularly, the present invention relates to a control circuit having an internal code interpretation section, which is used in a non-volatile semiconductor memory requiring a complicated internal control, and a semiconductor device including the same.
2. Description of the Related Art
Recent advances of semiconductor technology and increasing variety of its applications lead to further complication and diversification of the specification of a microcomputer, a semiconductor memory, and the like. The development of a high-performance, highly-reliable device in a short time is a challenge. To address such a challenge, a circuit block in an existing device is preferably reused so as to reduce the development time. Particularly, since a typical control circuit is a collection of complicated circuits, the reuse of an existing circuit significantly contributes to a reduction in the development time.
A control circuit having an internal code interpretation section may be used for a non-volatile semiconductor memory or the like requiring complicated internal control. An internal command which can be executed directly by a control circuit is herein referred to as an xe2x80x9cinternal commandxe2x80x9d. A command, which externally instructs a semiconductor memory or the like to operate, is referred to as an xe2x80x9cexternal commandxe2x80x9d. Typically, an operation specified by an external command is achieved by a number of internal commands which are executed in a specified sequence. Such a group of internal commands which are arranged in a specified order (a program composed of internal commands so as to achieve an operation specified by an internal command) is herein referred to as an xe2x80x9cinternal codexe2x80x9d.
A semiconductor memory will be described as an example. An external instruction to a semiconductor memory, such as data write and data erase, corresponds to an external command. A series of internal commands included in a semiconductor memory, which are sequentially executed so as to achieve data write or data erase, corresponds to an internal code. In particular, the area of a semiconductor memory or the like should be as small as possible. Therefore, a control circuit including internal commands having a fixed instruction length, which leads to simplification of the circuit, is used.
FIG. 11 is a diagram showing a structure of a conventional control circuit 210. The control circuit 210 includes an external command register 26, a control signal register 27, and an internal code interpretation section 29. An external command 2B input from the outside of the control circuit 210 is stored in the external command register 26. The control signal register 27 receives a signal 2I output from the internal code interpretation section 29, and outputs a control signal 2A to the outside of the control circuit 210. The internal code interpretation section 29 includes an internal code storage section 21, an internal command register 22, a program counter 23, an internal command execution section 24, and an external command recognition section 25. The internal code storage section 21 (hereinafter referred to as an xe2x80x9cinternal ROMxe2x80x9d) includes a ROM or the like in which an internal code is stored. The internal ROM 21 may include a non-volatile memory. The internal command register 22 is used to store an internal command 2E read from the internal ROM 21, and outputs an internal command 2F. The program counter 23 selects and provides the address of an internal command to be executed, from the addresses of a plurality of internal commands stored in the internal ROM 21. The internal command execution 24 executes the internal command 2F output from the internal command register 22. The external command recognition section 25 recognizes an operation instructed by an external command.
FIG. 12 is a diagram showing a structure of a semiconductor memory 220 including the control circuit 210. The semiconductor memory 220 includes an input/output buffer 201, an input buffer 202, an internal booster circuit 203, a write/erase control circuit 204, and address decoder circuit 205, a memory array 206, a sense circuit 207, and a control circuit 210. The input/output buffer 201 has data buses D0 through Dn at the input and output sides. The data buses D0 through Dn are used to input external commands, write data, and the like, and to output read data. The input buffer 202 has address buses A0 through An at the input side. The input buffer 202 receives a chip selection signal CE# (# represents an inverted signal) and a command write enable signal WE#. The internal booster circuit 203 boosts a supply voltage Vpp. The memory array 206 is used to store information. The sense circuit 207 reads out information from the memory array 206.
In the semiconductor memory 220, the circuits 203, 204 and 207 are controlled in accordance with the control signal 2A output from the control circuit 210 so that information is written to or erased from the memory array 206. The control signal 2A is input to the internal booster circuit 203, the write/erase control circuit 204 and the sense circuit 207. For example, the internal booster circuit 203 is controlled so that the start or end of a boost is controlled in accordance with the control signal 2A, or the boosted potential of the supply voltage Vpp is determined.
An operation of the control circuit 210 will be described.
The external command 2B stored in the external command register 26 is output from the external command register 26 to the external command recognition section 25. The external command recognition section 25 recognizes whether the external command 2B can be executed by the control circuit 210. When it is determined that the external command 2B can be executed by the control circuit 210, the external command recognition section 25 outputs a leading address 2C of an internal code required for an operation specified by the external command 2B. The program counter 23 selects and provides the address of an internal command to be executed, from a plurality of internal command addresses stored in the internal ROM 21. The internal ROM 21 outputs an internal command corresponding to a leading address 2D of the internal code stored in the program counter 23 (in this case, the address 2D is identical to the address 2C), i.e., a leading internal command 2E in the internal code to be executed, to the internal command register 22 in which the internal command is in turn stored. The internal command execution section 24 executes a specified operation, control, or the like in accordance with an internal command 2F output from the internal command register 22. The internal command execution section 24 outputs a signal 2I to update a value stored in the control signal register 27 if required, or outputs an address 2G of an internal command to be executed to the program counter 23 in order to store an internal code 2E to be executed in the internal command register 22.
As described above, the control circuit 210 achieves an operation specified by the external command 2B by a plurality of internal commands stored in the internal ROM 21 being output to the internal command execution section 24 in a specified sequence, and being executed sequentially.
In the control circuit 210, the implementation of a new external code, the change of an existing external code, and the like can be achieved by changing an internal code stored in the internal ROM 21. Therefore, the control circuit 210 is used for general purposes.
When a semiconductor memory having a new operating specification is developed, the configuration of the control circuit of the semiconductor memory is used, as it is, by changing an internal code. Now it is assumed that an attempt is made to develop a new semiconductor memory adopting a write architecture different from a conventional one. Although peripheral circuits, such as the address decoder circuit 205 and the write/erase control circuit 204, need to be newly developed, a control circuit for controlling the peripheral circuit can be used only by changing the internal code so that the peripheral circuit is operated in a desired manner, without modification of the basic structure.
As described above, the control circuit 210 can be used for general purposes by changing the internal code stored in the internal ROM 21. The control circuit 210 contributes to reutilization of design resources, thereby reducing the development time of a device having a high level of performance and reliability.
A longer internal command sequence (a greater capacity of internal code) than a conventional one needs to be stored in the internal ROM 21 using a semiconductor memory or the like including the control circuit 210, in order to: (1) achieve various types of specification; (2) implement an external command requiring a complicated internal operation; or (3) correspond an internal code to a number of external commands.
Examples of factors which restrict the capacity of an internal ROM include the number of bits in a program counter, the instruction length (bit length) of an internal command, and the number of bits of an internal command register.
Hereinafter, the number of bits in a program counter will be described.
To select one internal command from an internal ROM and output the internal command to an internal command register, the program counter needs to indicate one address in an address space in the internal ROM as described above. For example, when the program counter has a 16-bit structure, the address space (the addresses of the internal ROM) which the counter can point to is in the range of 0000H to FFFFH. Even if the internal ROM has an address space which exceeds such a range, an internal command at an address outside the range cannot be read out. In this case, the available capacity of the internal ROM is limited to 216 words (64 K words: 65536 lines of internal commands).
Next, the instruction length (bit length) of an internal command will be described.
When an architecture having a fixed instruction length is adopted, an internal command has a predetermined number of bits (instruction length). An internal command having a width of N bits is herein referred to as an N-bit instruction. Any type of an internal command includes an operation code of several bits indicating the type of an operation (calculation, control, or the like) in the execution part of the internal command. Further, a typical internal command includes an instruction which directly specifies an address in the internal ROM of a command to be executed (the instruction is generally referred to as a jump instruction or a call instruction). This command is essential in a conditional branch in an algorithm achieved by an internal code. For example, a jump instruction includes at least the above-described operation code portion, and the address in the internal ROM of an internal command to be executed. In this case, when the control circuit 210 adopting a 16-bit instruction is used, if the operation code portion is one bit, the address space is a space indicated only by 15-bit addresses. Therefore, when a target range of branches of a jump instruction is all internal commands within an internal code, the available capacity of the internal ROM is 213 words (32 k words: 32768 lines of internal commands).
The number of bits in an internal command register will be described.
A control circuit adopting an N-bit instruction needs to include an internal command register having at least a capacity of N bits. Therefore, the number of bits in the internal command register restricts the instruction length of an internal command, and further restricts the capacity of an internal available ROM.
As described above, when the control circuit 210 is used, the capacity of the internal ROM is restricted depending on the circuit configuration thereof. To remove the restriction, the number of bits in a program counter, the instruction length (bit length) of an internal command, and the number of bits in the internal command register may be increased to a required level.
For example, if the instruction length of each internal command is longer but the lines of internal commands are the same, the physical capacity of an internal ROM required for storage of the internal commands is increased. For example, when an internal code having 1024 lines (1 Kwords) of internal commands are stored in an internal ROM, a control circuit adopting a 12-bit instruction requires an internal ROM having a capacity of 12 Kbits. Similarly, a control circuit adopting a 16-bit instruction requires an internal ROM having a capacity of 16 Kbits. An increase in the physical capacity of an internal ROM means an increase in the area of a chip. Further, an internal command execution portion and an internal command register need to be modified, the width of a signal bit line or the like between each component circuit needs to be increased depending on the instruction length of an internal command, and the like. Thus, an increase in the physical capacity of an internal ROM leads to a considerable level of modification of hardware and an increase in the area of a chip. Moreover, when the instruction length of an internal command is increased, the development environment of software, such as a translating program (e.g., assembler), may be changed. The instruction length of an internal command also needs to be increased when the number of bits in a program counter is increased or when the number of bits in an internal command register is increased.
As described above, when the control circuit 210 is used, the removal of restrictions on the capacity of an internal ROM leads to a considerable level of modification of the control circuit which causes an increase in the development time of a device or an increase in the area of a chip. Further, a conventional development environment or a past design resource may be sacrificed. In other words, when the control circuit 210 is reused to reduce the development time of a device, the restriction on the capacity of an internal ROM cannot be removed.
According to one aspect of the present invention, a control circuit comprises an external command recognition section for recognizing an external command, the external command being an operation command input from outside the control circuit, an internal ROM bank including a plurality of storage regions (e.g., ROM regions), the internal ROM bank being used to store an internal code for achieving operations specified by the external command recognized by the external command recognition section, an internal ROM selection section for selecting a required storage region from the plurality of storage regions of the internal ROM bank in accordance with the external command recognized by the external command recognition section, a program counter for selecting and indicating an address of an internal command to be executed from a plurality of addresses of internal commands stored in the internal ROM bank, an internal command register for storing the internal command read from the internal ROM bank, and an internal command execution section for executing the internal command stored in the internal command register.
In one embodiment of this invention, the internal ROM selection section can switch the selected storage region depending on a result of a comparison of the address indicated by the program counter with a specific address.
In one embodiment of this invention, the internal ROM selection section further includes an address register, and the specific address can be changed by setting an arbitrary value in the address register.
According to another aspect of the present invention, a semiconductor device comprises a control circuit. The control circuit comprises an external command recognition section for recognizing an external command, the external command being an operation command input from outside the control circuit, an internal ROM bank including a plurality of storage regions, the internal ROM bank being used to store an internal code for achieving operations specified by the external command recognized by the external command recognition section, an internal ROM selection section for selecting a required storage region from the plurality of storage regions of the internal ROM bank in accordance with the external command recognized by the external command recognition section, a program counter for selecting and indicating an address of an internal command to be executed from a plurality of addresses of internal commands stored in the internal ROM bank, an internal command register for storing the internal command read from the internal ROM bank, and an internal command execution section for executing the internal command stored in the internal command register.
In one embodiment of this invention, the internal ROM selection section can switch the selected storage region depending on a result of a comparison of the address indicated by the program counter with a specific address.
In one embodiment of this invention, the internal ROM selection section further includes an address register, and the specific address can be changed by setting an arbitrary value in the address register.
Hereinafter, functions of the present invention will be described.
As described above, according to the present invention, a storage region in which an internal code required for achievement of an operation specified by an external command is stored, can be selected from an internal ROM bank including a plurality of storage regions. Therefore, the capacity of an internal ROM can be increased without an increase in the number of bits in a program counter, the instruction length (bit length) of an internal command, and/or the number of bits in an internal command register, unlike conventional control circuits. Conventionally, the capacity of an internal ROM is restricted by the number of bits in a program counter, the instruction length (bit length) of an internal command, and/or the number of bits in an internal command register, so that if there is an address space of the internal ROM which exceeds the restricted capacity, an internal command at an address falling within the exceeding portion cannot be read out. In the present invention, the internal ROM bank is divided into a plurality of regions so that, the address space of each selected region of the internal ROM can be utilized in a range corresponding to the same capacity as that of a conventional internal ROM. The plurality of storage regions may not necessarily be of the same size. The capacity of each storage region may be set to a minimum value. Further, an internal ROM selection section, a comparator circuit, an address register, and the like having a simple structure can be achieved, so that a configuration of the control circuit is not complicated. Each of the plurality of regions in the internal ROM is herein referred to as an internal ROM bank.
Further, according to the present invention, a comparator circuit or the like is provided in an internal ROM selection section so that the address of an internal command to be executed, indicated by a program counter, is compared with a specific address. In accordance with a result of the comparison, a storage region is selected so that an internal command can be shared by a plurality of internal codes. Therefore, a storage region can be physically reduced.
Furthermore, according to the present invention, an address register is provided in an internal ROM selection section and the address register is set to an arbitrary value. The address of an internal command to be executed is compared with the value of the address register. In accordance with the result of the comparison, a storage region is selected so that the internal command shared by a plurality of internal codes can be provided in an arbitrary storage region.
With the control circuit of the present invention, field-proven design resources are utilized so as to reduce the development time of a semiconductor device, such as a microcomputer and a memory.
Thus, the invention described herein makes possible the advantages of providing: a control circuit in which the capacity of an internal ROM can be increased without a considerable level of modification of the control circuit and an increase in the area of a chip, and the development time of an application device can be reduced by utilizing existing design resources; and a semiconductor device including the control circuit.
These and other advantages of the present invention will become apparent to those skilled in the art upon reading and understanding the following detailed description with reference to the accompanying features.